Spread ASP.NET 18
FarPoint.Web.Spread Assembly / FarPoint.Web.Spread Namespace / SheetView Class / SortColumns Method / SortColumns(Int32,Int32,SortInfo[]) Method
Starting column index (the start of the range of columns to sort)
Number of columns in the range to sort
Array of SortInfo objects that contain the row indexes and the order of sorting
Example


In This Topic
    SortColumns(Int32,Int32,SortInfo[]) Method
    In This Topic
    Sorts a range of columns in the sheet according to the specified parameters.
    Syntax
    'Declaration
     
    
    Public Overloads Function SortColumns( _
       ByVal column As Integer, _
       ByVal columnCount As Integer, _
       ByVal sortInfo() As SortInfo _
    ) As Boolean
    'Usage
     
    
    Dim instance As SheetView
    Dim column As Integer
    Dim columnCount As Integer
    Dim sortInfo() As SortInfo
    Dim value As Boolean
     
    value = instance.SortColumns(column, columnCount, sortInfo)
    public bool SortColumns( 
       int column,
       int columnCount,
       SortInfo[] sortInfo
    )

    Parameters

    column
    Starting column index (the start of the range of columns to sort)
    columnCount
    Number of columns in the range to sort
    sortInfo
    Array of SortInfo objects that contain the row indexes and the order of sorting

    Return Value

    true if successful; otherwise false
    Remarks

    Use this method if you want to sort only a range of columns and not the entire sheet.

    Use this method if you want to specify more than one row by which to sort. In other words, if you have more than one key for sorting. The SortInfo array can contain multiple keys (multiple rows) and the first specified row is the primary key, etc. The SortInfo array can also contain a value for IComparer to allow you to specify the way of comparing that is used in the sort and it may be different for each key.

    Example
    This example illustrates the use of this member by sorting the columns with the specified parameters.
    See Also